<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>rotateZ 旋转</title>
        <style>
            body {
                perspective: 500px;
            }

            img {
                display: block;
                margin: 100px auto;
                transition: all 1s;
            }

            img:hover {
                transform: rotateZ(180deg);
            }
        </style>
    </head>

    <body>
        <img src="images/pig.jpg" alt="" />
    </body>
</html>
